import request from '@/utils/request';

/**
 * @Date         : 2023-02-28 11:06:41
 * @description  : 获取购物车列表
 * @return        {Promise}
 */
export const getCartList = () => request({ url: '/member/cart', method: 'get' });



/**
 * @Date         : 2023-02-28 16:19:13
 * @description  : 删除商品或删除失效商品
 * @param         {Array} ids:skuId集合
 * @param         {Boolean} clearAll:是否删除商品
 * @param         {Boolean} clearInvalid:是否删除失效商品
 * @return        {*}
 */
export const removeGoods = ids => {
	return request({
		url: '/member/cart',
		method: 'DELETE',
		header: { 'Content-Type': 'application/json' },
		data: { ids },
	});
};
